package cn.math.appmath.biz.impl;

import cn.math.appmath.bean.AchievementBean;
import cn.math.appmath.biz.AchievementBiz;
import cn.math.appmath.dao.AchievementDao;
import cn.math.appmath.entity.Achievement;

public class AchievementBizImpl implements AchievementBiz {
	private AchievementDao achievementDao;
	
	public boolean delete(Integer[] ids) {
		return this.achievementDao.batchDelete(ids);
	}

	public AchievementBean findAll(int page, String param) {
		if(param.equals("forward")){
			page = page - 2;
		}
		return achievementDao.findAll(page);
	}

	public Achievement findById(Integer id) {
		return this.achievementDao.findById(id);
	}

	public boolean save(Achievement achievement) {
		return achievementDao.save(achievement);
	}

	public void update(Achievement achievement) {
		// TODO Auto-generated method stub

	}

	public void setAchievementDao(AchievementDao achievementDao) {
		this.achievementDao = achievementDao;
	}

}
